class Product < ActiveRecord::Base
  belongs_to :product_category
  has_many :sales
  
  validates_presence_of :name
  validates_length_of :name, :maximum => 100
  
  validates_presence_of :product_category
  
  validates_presence_of :price
  validates_numericality_of :price
  validates_positiveness_of :price
end
